package com.gxa.hualian.configuration;

import com.gxa.hualian.pojo.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 通过配置形式创建一个User的bean
 * @Author ChenJin
 * @date 2021/10/19 15:16
 * Description:
 **/

@Configuration
public class UserConfig {

    @Bean(name = "userBean")
    public User getUser(){
        User user = new User();
        user.setId(40L);
        user.setName("chen");
        user.setPhone("15915915932");
        return user;
    }


}
